import request from '@/utils/request'

// 查询小区内的房屋列信息列表
export function listRoom(query) {
  return request({
    url: '/module/estate/room/list',
    method: 'get',
    params: query
  })
}


// 查询 房屋列表
export function getTransferData(query) {
  return request({
    url: '/module/estate/room/getTransferData',
    method: 'get',
    params: query
  })
}

// 查询 业主信息
export function getUserData(phone) {
  return request({
    url: '/module/estate/room/getUserData/' + phone,
    method: 'get',
  })
}

// 查询 业主数量
export function getRoomNum() {
  return request({
    url: '/module/estate/room/getRoomNum',
    method: 'get',
  })
}

// 查询小区内的房屋列信息详细
export function getRoom(id) {
  return request({
    url: '/module/estate/room/' + id,
    method: 'get'
  })
}

// 查询小区内的房屋套内账户余额信息
export function getRoomAccount(id) {
  return request({
    url: '/module/estate/room/account/' + id,
    method: 'get'
  })
}

// 生成小区内的房屋的业主信息信息（假）
export function listShengcheng(query) {
  return request({
    url: '/module/estate/room/shengcheng',
    method: 'get',
    params: query
  })
}

// 新增小区内的房屋列信息
export function addRoom(data) {
  return request({
    url: '/module/estate/room',
    method: 'post',
    data
  })
}

export function sendSmsToUnPay(data) {
  return request({
    url: '/module/estate/room/sendSmsToUnPay',
    method: 'post',
    data
  })
}


// 新增小区内的房屋列信息
export function addTempByYear(data) {
  return request({
    url: '/module/estate/room/addTempByYear',
    method: 'post',
    data
  })
}

// 新增房屋的缴费数据
export function addTempByRoomYear(data) {
  return request({
    url: '/module/estate/room/addTempByRoomYear',
    method: 'post',
    data
  })
}

// 修改小区内的房屋列信息
export function updateRoom(data) {
  return request({
    url: '/module/estate/room',
    method: 'put',
    data
  })
}

// 修改小区内的房屋列信息
export function chongzhi(data) {
  return request({
    url: '/module/estate/room/chongzhi',
    method: 'put',
    data
  })
}

// 修改小区内的房屋空置房
export function updateVacant(data) {
  return request({
    url: '/module/estate/room/updateVacant',
    method: 'put',
    data
  })
}

// 修改小区内的房屋空置房
export function delectVacant(data) {
  return request({
    url: '/module/estate/room/delectVacant',
    method: 'put',
    data
  })
}

// 修改小区内的房屋列信息
export function updateRoomFloor(data) {
  return request({
    url: '/module/estate/room/editFloor',
    method: 'put',
    data
  })
}


// 删除小区内的房屋列信息
export function delRoom(id) {
  return request({
    url: '/module/estate/room/' + id,
    method: 'delete'
  })
}

// 导出小区内的房屋列信息
export function exportRoom(query) {
  return request({
    url: '/module/estate/room/export',
    method: 'get',
    params: query
  })
}

// 导出小区内的房屋列信息
export function exportWater(query) {
  return request({
    url: '/module/estate/room/waterExport',
    method: 'get',
    params: query
  })
}

// 导出小区内的房屋列信息
export function exportEletrict(query) {
  return request({
    url: '/module/estate/room/eletrictExport',
    method: 'get',
    params: query
  })
}

// 查询小区内的房屋列信息详细
export function getEstateRoom(query) {
  return request({
    url: '/module/estate/room/' + id,
    method: 'get'
  })
}

export function arrearageList(query) {
  return request({
    url: '/module/estate/room/arrearageList',
    method: 'get',
    params: query
  })
}

//导出欠费记录
export function exportArrearage(query) {
  return request({
    url: '/module/estate/room/exportArrearage',
    method: 'get',
    params: query
  })
}

// 重置二维码
export function resetQrCodeMulti(id) {
  return request({
    url: '/module/estate/room/resetQrCodeMulti/' + id,
    method: 'delete'
  })
}


// 重置二维码
export function resetQrCode(data) {
  return request({
    url: '/module/estate/room/resetQrCode',
    method: 'post',
    data
  })
}
